package com.liyuxiang.exception;

import com.liyuxiang.vm.enums.ResultStatusEnum;
import lombok.Data;
import org.springframework.web.bind.annotation.ResponseStatus;

@Data
public class SystemException extends RuntimeException{
    private int code;
    private String msg;

    public SystemException(ResultStatusEnum resultStatusEnum) {
        this.code = resultStatusEnum.getCode();
        this.msg = resultStatusEnum.getMsg();
    }
}
